//
//  FamilyService.h
//  AILock
//
//  Created by 谭亚明 on 2020/6/23.
//  Copyright © 2020 tym. All rights reserved.
//

#import "LMJBaseRequest.h"
#import "FamilyModel.h"
#import "ApplyforModel.h"
#import "EquipmentModel.h"
//----------------------用户申请模块-----
/*用户申请加入家庭*/
#define urlFamilyuserapply  @"/family-user/apply"

/*用户取消申请*/
#define urlFamilyusercancelapply  @"/family-user/cancel-apply"

/*家长审核申请*/
#define urlFamilyuserauditapply  @"/family-user/audit-apply"

/*获取用户自己的申请信息*/
#define urlFamilyuserfinduserapplys  @"/family-user/find-user-applys"






//----------------------家庭用户模块-----
/*获得家庭成员信息列表*/
#define urlFamilyuserfindfamilyusers  @"/family-user/find-family-users"

/*删除家庭用户/移除黑名单*/
#define urlFamilyuserdeletefamilyusers  @"/family-user/delete-family-user"


/*根据家庭用户关系id，获取家庭成员详情*/
#define urlFamilyuserfindfamilyuser  @"/family-user/find-family-user"

/*授予用户家长*/
#define urlFamilyusergrantpatriarch @"/family-user/grant-patriarch"

/*添加游客用户*/
#define urlFamilyuseraddequipmentgroupuser @"/family-user/add-equipment-group-user"

/*游客绑定用户*/
#define urlFamilyusergroupuserbindappuser @"/family-user/group-user-bind-app-user"

/*修改家庭用户状态*/
#define urlFamilyuserupdatefamilyuserstatus @"/family-user/update-familyuser-status"

/*创建家庭*/
#define urlCreatefamily  @"/family-info/create-family"

/*修改家庭信息*/
#define urlUpdatefamily  @"/family-info/update-family"

/*获取家庭所有设备*/
#define urlFindfamilyequipmenty  @"/family-info/find-family-equipment"

/*获得家庭的用户申请信息*/
#define urlFamilyuserfindapply  @"/family-user/find-family-applys"

/* 查找家庭*/
#define urlFamilyFindfamilys  @"/family-info/find-familys"

/*获取用户当前默认家庭*/
#define urlCurrentfamily  @"/family-user/user-current-family"

/* 获取用户家庭列表*/
#define urlFindfamilys @"/family-user/find-familys"


/*获取用户家庭信息*/
#define urlFindfamily  @"/family-user/find-family"

/*根据familyId获取家庭详情*/
#define urlInfofindfamily  @"/family-info/find-family"

/*切换/进入家庭*/
#define urlSwitchoverfamily  @"/family-user/switchover-family"

/*退出家庭*/
#define urlExitfamily  @"/family-user/exit-family"

/*是否记住业务密码*/
#define urlRememberoppwd  @"/user/remember-op-pwd"

/*设置业务密码*/
#define urlOperationpwd  @"/user/update-operation-pwd"

/*删除游客用户*/
#define urlDeleteequipmentgroupuser  @"/family-user/delete-equipment-group-user"


NS_ASSUME_NONNULL_BEGIN

@interface FamilyService : LMJBaseRequest

/*是否记住业务密码*/
-(void)getRememberoppwd:(BOOL)rememberOpPwd completion:(void(^)(LMJBaseResponse  *responObjec))completion;

/*设置业务密码*/
-(void)getUpdateoperationpwd:(NSString*)pwdStr completion:(void(^)(LMJBaseResponse  *responObjec))completion;

/*用户申请加入家庭*/
-(void)getFamilyuserapplyFamilyId:(NSInteger)famileId completion:(void(^)(LMJBaseResponse  *responObjec))completion;

/*用户取消申请*/
-(void)getFamilyuserCancelapplyApplyId:(NSInteger)applyId completion:(void(^)(NSError *error,id  responObjec))completion;


/*家长审核申请*/
-(void)getFamilyuserAuditapplyId:(NSInteger)applyId status:(NSInteger)staus auditDesc:(NSString*)desc completion:(void(^)(NSError *error,id  responObjec))completion;

/*获取用户自己的申请信息*/
-(void)getFinduserApplyscompletion:(void(^)(NSError *error,NSArray<ApplyforModel*>  *array))completion;


/*获得家庭成员信息列表*/
-(void)getFamilyuserfindfamilyusers:(NSInteger)familyId status:(NSInteger)status type:(NSInteger)type completion:(void(^)(NSError *error, NSArray<UserModel*>  *array))completion;




/*创建家庭*/
-(void)getCreatFamilyWithFamilyName:(NSString*)name desc:(NSString*)familyDesc image:(NSString*)image completion:(void(^)(NSError *error, LMJBaseResponse *response))completion;

/*修改家庭信息*/
-(void)getUpdateFamilyWithFamilyId:(NSInteger)famileId FamilyName:(NSString*)name desc:(NSString*)familyDesc image:(NSString*)image completion:(void(^)(LMJBaseResponse *response))completion;

/*获取家庭所有设备*/
-(void)getFamilyAllEquipmentWithFamilyId:(NSInteger)famileId completion:(void(^)(NSError *error,NSArray<EquipmentModel*>  *array))completion;

/*获得家庭的用户申请信息*/
-(void)getFamilyFpplysWithFamilyId:(NSInteger)famileId completion:(void(^)(NSError *error,NSArray<ApplyforModel*>  *array))completion;

/*删除家庭用户/移除黑名单*/
-(void)getFamilyuserdeletefamilyusers:(NSInteger)famileId completion:(void(^)(LMJBaseResponse  *respons))completion;


/*删除游客用户*/
-(void)getDeleteequipmentgroupuser:(NSInteger)famileId
                        userID:(NSInteger)userID
                        deleteEquipmentUser:(BOOL)equDele
                        completion:(void(^)(LMJBaseResponse  *respons))completion;


/*授予用户家长*/
-(void)getFamilyusergrantpatriarch:(NSInteger)famileuseId completion:(void(^)(NSError *error,id  respons))completion;

/*查找家庭*/
-(void)getFindFamilysWithName:(NSString*)name page:(NSInteger)page size:(NSInteger)size completion:(void(^)(NSError *error,NSArray<FamilyModel*>  *array))completion;

/*获取用户当前默认家庭*/
-(void)getFamilyUserCurrentCompletion:(void(^)(LMJBaseResponse *sponse, FamilyModel *response))completion;

/*获取用户家庭列表*/
-(void)getFindFamilysCompletion:(void(^)(NSError *error, NSArray<FamilyModel*> *array))completion;

/*获取用户家庭信息*/
-(void)getFindFamilyWithFamilyID:(NSInteger)familyID Completion:(void(^)(NSError *error, FamilyModel *model))completion;

/*根据familyId获取家庭详情*/
-(void)getFindfamilyDetailWithFamilyID:(NSInteger)familyID Completion:(void(^)(NSError *error, FamilyModel *model))completion;

/*切换/进入家庭*/
-(void)getSwitchoverFamilyWithFamilyID:(NSInteger)familyID Completion:(void(^)(LMJBaseResponse * responsed))completion;

/*退出家庭*/
-(void)getExitfamilyWithFamilyID:(NSInteger)familyID Completion:(void(^)(LMJBaseResponse *responsed))completion;


/*添加游客用户*/
-(void)getAddequipmentgroupuser:(NSInteger)familyId
                     nickname:(NSString*)nickName
                     heakImaUrl:(NSString*)headImage
                      equipmentID:(NSInteger)equipmentid
                     Completion:(void(^)(LMJBaseResponse *responsed))completion;


/*游客绑定用户*/
-(void)getGroupuserbindappuserFamily:(NSInteger)familyID groupUserId:(NSInteger)groupUserId
userId:(NSInteger)userId
equipmentId:(NSInteger)equipmentId
                          Completion:(void(^)(LMJBaseResponse * responsed))completion;



/*修改家庭用户状态*/
-(void)getUpdatefamilyuserstatus:(NSInteger)familyUserId
                      status:(NSInteger)status Completion:(void(^)(LMJBaseResponse *responsed))completion;

@end

NS_ASSUME_NONNULL_END
